"""
复写父类成员和调用父类成员
"""
class Phone:
    IMEI = None
    producer = "ITCAST"
    def call_by_5g(self):
        print("使用5G网络打电话")
# 定义一个子类
class Phone2022(Phone):
    producer = "ITHEMA" # 复写父类的成员变量
    def call_by_5g(self): # 复写父类的方法
        print("使用5G网络打电话, 支持SA/NSA双模")
        # 调用父类的方法
        super().call_by_5g()
        Phone.call_by_5g(self)
        print(f"父类的生产厂家是{Phone.producer}")
        print(f"父类的IMEI是{super().IMEI}")
phone = Phone2022()
print(phone.producer)
phone.call_by_5g()


print(phone.IMEI) # None